package it.csi.finregio.finreges.presentation.servlet;

import it.csi.finregio.finreges.presentation.form.SchedaForm;
import it.csi.finregio.finreges.util.RequestUtil;

import java.io.IOException;
import java.util.Enumeration;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.enum.Enum;
import org.apache.struts.Globals;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.RequestActionMapping;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.util.RequestUtils;

public class CheckIfSchedaChangedServlet extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8382292111140939808L;

	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		HttpSession session = request.getSession(false);
		SchedaForm schedaForm = (SchedaForm) session.getAttribute("schedaForm");
		SchedaForm aSchedaForm = new SchedaForm();
		RequestUtil.fillActionForm(request, aSchedaForm);
		System.out.println(schedaForm);
//		SchedaForm aSchedaForm = (SchedaForm) RequestUtils.createActionForm(request, mapping, moduleConfig, servlet);
//		System.out.println(aSchedaForm);
		
	}

	protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		doPost(arg0, arg1);
	}
	
	
	
	
	

}
